package other.thread;

public class MyThread extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 15; i++) {
            System.out.println("线程"+this.currentThread()+"打印出:" + i);
            try {
                sleep(100);
            } catch (InterruptedException e) {//被中断时，处在sleep，wait，join状态会被唤醒，而非死亡
                System.out.println("线程处于中断中，请等待");
            }
        }
    }
}
